{% extends "base.html" %}


{% block submenu %}
<p>    
{% ifequal view "tasks" %}
    <div class="submenu"> <a href="/tasktracker/task/new/">New</a>&nbsp;::&nbsp;</div>
{% else %}
    Submenu
{% endifequal %}
</p>    
{% endblock %} 


{% block search_form %}
<div class="search">
   {% ifequal view "tasks" %}
        <form action="/tasktracker/task/" method="POST">
   {% else %}
        <form action="/tasktracker/archive/" method="POST">
   {% endifequal %}
        <input type="text" name="search" value="{{search_criteria}}"size=60/>
        <input type="submit" value="Search"/>
    </form>
</div>
{% endblock %}



{% block tasks %}
<div class="tasks">
{% for task in tasks %}
    <div class="task">
        <div class="task-description">* {{ task.description }}</div>
        <div class="task-detail">
            {% ifequal view "tasks" %}
                Opened: <b>{{ task.opened }}</b> <br/>
                Category: <b>{{ task.category }}</b> Status: <b>{{ task.get_status_display }}</b><br/>
                <a href="/tasktracker/task/">Today<a/> &nbsp;
                <a href="/tasktracker/task/{{ task.id }}/edit/">Edit<a/> &nbsp; :: &nbsp;
                <a href="/tasktracker/task/{{ task.id }}/completed/">Mark as completed<a/>
            {% else %}
                Opened: <b>{{ task.opened }}</b> Closed: <b>{{ task.closed }}</b><br/>
                Category: <b>{{ task.category }}</b> Status: <b>{{ task.get_status_display }}</b><br/>
            {% endifequal %}
        </div>
    </div>
    <hr/>
{% endfor %}
</div>
{% endblock %}
